import request from '../util/httpTool'
import DeviceParamListReq from "../req/DeviceParamListReq";
import DeviceParam from "../res/DeviceParam";


const basePath = 'iot/api/v1/v1/device/param/'

export function list(req: DeviceParamListReq): Promise<DeviceParam[]> {
    return new Promise<DeviceParam[]>((resolve, reject) => {
        const res: any = request({
            url: basePath + 'list',
            method: 'post',
            data: req
        })
        res.then((data: DeviceParam[]) => {
            resolve(data)
        }).catch((e: any) => {
            reject(e)
        })
    })
}



